package com.smart.six.beanproperty;

import javax.sql.DataSource;

/**
 * 从数据库中获取配置信息
 *
 * @author junrui.wang
 * @create 2018/7/12
 */
public class SysConfig {
    private int sessionTimeout;
    private int maxTablePageNum;
    private DataSource dataSource;

    public void initPropertyFromDB(){
        //模拟从数据库获取数据
        sessionTimeout = 100;
        maxTablePageNum = 10;
    }

    public int getSessionTimeout() {
        return sessionTimeout;
    }

    public void setSessionTimeout(int sessionTimeout) {
        this.sessionTimeout = sessionTimeout;
    }

    public int getMaxTablePageNum() {
        return maxTablePageNum;
    }

    public void setMaxTablePageNum(int maxTablePageNum) {
        this.maxTablePageNum = maxTablePageNum;
    }

    public DataSource getDataSource() {
        return dataSource;
    }

    public void setDataSource(DataSource dataSource) {
        this.dataSource = dataSource;
    }
}
